package com.zhiyou.shop.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zhiyou.shop.model.OrderModel;
import com.zhiyou.shop.service.IOrderService;

@Controller
@RequestMapping("/front")
public class OrderController {
	@Autowired
	IOrderService service;
    @RequestMapping("order.do")
    public String order(Model model){
    	
    	List<OrderModel> order =service.queryOrder();
    	model.addAttribute("order", order);
    	
    	return "front/order";
    }
    //代付款查询
    @RequestMapping("payment.do")
    public String payment(String state,Model model){
    	
    	System.out.println("333333"+state);
    	List<OrderModel> order =service.queryOrder();
    	model.addAttribute("order", order);
    	
    	return "front/order";
    }
  //代发货查询
    @RequestMapping("shipments.do")
    public String shipments(String state,Model model){
    	
    	List<OrderModel> order =service.queryOrder();
    	model.addAttribute("order", order);
    	
    	return "front/order";
    }
  //代收货查询
    @RequestMapping("gain.do")
    public String gain(Model model){
    	
    	List<OrderModel> order =service.queryOrder();
    	model.addAttribute("order", order);
    	
    	return "front/order";
    }
  //代评价查询
    @RequestMapping("appraise.do")
    public String appraise(Model model){
    	
    	List<OrderModel> order =service.queryOrder();
    	model.addAttribute("order", order);
    	
    	return "front/order";
    }
}
